﻿using System;
using System.Collections.Generic;
using System.Text;

using SqlSugar;

namespace FSM.Model
{
    [SugarTable("tb_file_predelete")]
    public class tb_file_predelete
    {
        /// <summary> 
        /// 键值 
        /// </summary>} 
        [SugarColumn(IsPrimaryKey = true)]
        public int? id { get; set; }

        /// <summary> 
        /// 上级键值 
        /// </summary> 
        public int? upid { get; set; }

        /// <summary>
        /// 文件/文件夹层级
        /// </summary>
        public ushort level { get; set; }

        /// <summary> 
        /// 名称 
        /// </summary> 
        public string name { get; set; }

        /// <summary> 
        /// 1：文件夹 2：文件 
        /// </summary> 
        public int? type { get; set; }

        /// <summary> 
        /// 大小 
        /// </summary> 
        public decimal size { get; set; }

        /// <summary>
        /// 文件所在目录
        /// </summary>
        public string dir { get; set; }

        /// <summary>
        /// 虚拟目录
        /// </summary>
        public string virtual_dir { get; set; }

        /// <summary>
        /// 是否是新增,默认为false
        /// 用于判断是否是新增的文件夹
        /// 如果是的话，就是查询【新增文件夹】是否存在，如果存则自动在名称后加1
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public bool is_new { get; set; } = false;

        /// <summary>
        /// 子级
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<tb_file> children { get; set; } = new List<tb_file>();

        /// <summary> 
        /// 创建人 
        /// </summary> 
        public string creater { get; set; }

        /// <summary> 
        /// 创建日期 
        /// </summary> 
        public DateTime? create_date { get; set; }

        /// <summary> 
        /// 最后修改人 
        /// </summary> 
        public string editer { get; set; }

        /// <summary> 
        /// 最后修改日期 
        /// </summary> 
        public DateTime? edit_date { get; set; }

        /// <summary>
        /// 删除人
        /// </summary>
        public string deleter { get; set; }

        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? delete_date { get; set; }

        /// <summary>
        /// 删除主ID，用于还原的时候级联还原下级的文件/文件夹
        /// </summary>
        public int? delete_id { get; set; }

        /// <summary>
        /// 是否可以还原
        /// 主要用于还原后被覆盖的文件被删除后标记为不可还原
        /// </summary>
        public ushort can_restroe { get; set; }
    }
}
